{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Trust Scores applied to MNIST"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It is important to know when a machine learning classifier's predictions can be trusted. Relying on the classifier's (uncalibrated) prediction probabilities is not optimal and can be improved upon. *Trust scores* measure the agreement between the classifier and a modified nearest neighbor classifier on the test set. The trust score is the ratio between the distance of the test instance to the nearest class different from the predicted class and the distance to the predicted class. Higher scores correspond to more trustworthy predictions. A score of 1 would mean that the distance to the predicted class is the same as to another class.\n",
    "\n",
    "The original paper on which the algorithm is based is called [To Trust Or Not To Trust A Classifier](https://arxiv.org/abs/1805.11783). Our implementation borrows heavily from https://github.com/google/TrustScore, as does the example notebook.\n",
    "\n",
    "Trust scores work best for low to medium dimensional feature spaces. This notebook illustrates how you can **apply trust scores to high dimensional** data like images by adding an additional pre-processing step in the form of an [auto-encoder](https://en.wikipedia.org/wiki/Autoencoder) to reduce the dimensionality. Other dimension reduction techniques like PCA can be used as well."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n",
    "\n",
    "import tensorflow as tf\n",
    "from tensorflow.keras.layers import Conv2D, Dense, Dropout, Flatten, MaxPooling2D, Input, UpSampling2D\n",
    "from tensorflow.keras.models import Model, load_model\n",
    "from tensorflow.keras.utils import to_categorical\n",
    "\n",
    "import matplotlib\n",
    "%matplotlib inline\n",
    "import matplotlib.cm as cm\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "import numpy as np\n",
    "from sklearn.model_selection import StratifiedShuffleSplit\n",
    "from alibi.confidence import TrustScore"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train shape: (60000, 28, 28) y_train shape: (60000,)\n"
     ]
    },
    {
     "data": {
      "image/png": "i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i9pewN9fIHtq4sDJ7J9taTvaviGot4uaV3xfJ2kZxvs5XOGZRjvdsOMq+F11/jw5xEx8D9JqzR1RP4dST9vooc2fX1T0hvF3/6me5P0lKZ26z7R1LGNH0q6RtIuSW9L+n9Jc4aotz9K2ifpTU0Fa6Sh3pZrahf9TUl7i79VTa+7kr4Gst64XBZIggN0QBKEHUiCsANJEHYgCcIOJEHYgSQIO5DEvwEvYRv57rmVLgAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()\n",
    "print('x_train shape:', x_train.shape, 'y_train shape:', y_train.shape)\n",
    "plt.gray()\n",
    "plt.imshow(x_test[0]);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Prepare data: scale, reshape and categorize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train shape: (60000, 28, 28, 1) x_test shape: (10000, 28, 28, 1)\n",
      "y_train shape: (60000, 10) y_test shape: (10000, 10)\n"
     ]
    }
   ],
   "source": [
    "x_train = x_train.astype('float32') / 255\n",
    "x_test = x_test.astype('float32') / 255\n",
    "x_train = np.reshape(x_train, x_train.shape + (1,))\n",
    "x_test = np.reshape(x_test, x_test.shape + (1,))\n",
    "print('x_train shape:', x_train.shape, 'x_test shape:', x_test.shape)\n",
    "y_train = to_categorical(y_train)\n",
    "y_test = to_categorical(y_test)\n",
    "print('y_train shape:', y_train.shape, 'y_test shape:', y_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "xmin, xmax = -.5, .5\n",
    "x_train = ((x_train - x_train.min()) / (x_train.max() - x_train.min())) * (xmax - xmin) + xmin\n",
    "x_test = ((x_test - x_test.min()) / (x_test.max() - x_test.min())) * (xmax - xmin) + xmin"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Define and train model"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For this example we are not interested in optimizing model performance so a simple softmax classifier will do:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def sc_model():\n",
    "    x_in = Input(shape=(28, 28, 1))\n",
    "    x = Flatten()(x_in)\n",
    "    x_out = Dense(10, activation='softmax')(x)\n",
    "    sc = Model(inputs=x_in, outputs=x_out)\n",
    "    sc.compile(loss='categorical_crossentropy', optimizer='sgd', metrics=['accuracy'])\n",
    "    return sc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"model\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "input_1 (InputLayer)         [(None, 28, 28, 1)]       0         \n",
      "_________________________________________________________________\n",
      "flatten (Flatten)            (None, 784)               0         \n",
      "_________________________________________________________________\n",
      "dense (Dense)                (None, 10)                7850      \n",
      "=================================================================\n",
      "Total params: 7,850\n",
      "Trainable params: 7,850\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n",
      "Epoch 1/5\n",
      "60000/60000 [==============================] - 1s 12us/sample - loss: 1.2706 - acc: 0.6963\n",
      "Epoch 2/5\n",
      "60000/60000 [==============================] - 1s 9us/sample - loss: 0.7030 - acc: 0.8422\n",
      "Epoch 3/5\n",
      "60000/60000 [==============================] - 1s 9us/sample - loss: 0.5762 - acc: 0.8618\n",
      "Epoch 4/5\n",
      "60000/60000 [==============================] - 1s 9us/sample - loss: 0.5155 - acc: 0.8706\n",
      "Epoch 5/5\n",
      "60000/60000 [==============================] - 1s 9us/sample - loss: 0.4787 - acc: 0.8759\n"
     ]
    }
   ],
   "source": [
    "sc = sc_model()\n",
    "sc.summary()\n",
    "sc.fit(x_train, y_train, batch_size=128, epochs=5);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Evaluate the model on the test set:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test accuracy:  0.8862\n"
     ]
    }
   ],
   "source": [
    "score = sc.evaluate(x_test, y_test, verbose=0)\n",
    "print('Test accuracy: ', score[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Define and train auto-encoder"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ae_model():\n",
    "    # encoder\n",
    "    x_in = Input(shape=(28, 28, 1))\n",
    "    x = Conv2D(16, (3, 3), activation='relu', padding='same')(x_in)\n",
    "    x = MaxPooling2D((2, 2), padding='same')(x)\n",
    "    x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)\n",
    "    x = MaxPooling2D((2, 2), padding='same')(x)\n",
    "    x = Conv2D(4, (3, 3), activation=None, padding='same')(x)\n",
    "    encoded = MaxPooling2D((2, 2), padding='same')(x)\n",
    "    encoder = Model(x_in, encoded)\n",
    "\n",
    "    # decoder\n",
    "    dec_in = Input(shape=(4, 4, 4))\n",
    "    x = Conv2D(4, (3, 3), activation='relu', padding='same')(dec_in)\n",
    "    x = UpSampling2D((2, 2))(x)\n",
    "    x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)\n",
    "    x = UpSampling2D((2, 2))(x)\n",
    "    x = Conv2D(16, (3, 3), activation='relu')(x)\n",
    "    x = UpSampling2D((2, 2))(x)\n",
    "    decoded = Conv2D(1, (3, 3), activation=None, padding='same')(x)\n",
    "    decoder = Model(dec_in, decoded)\n",
    "    \n",
    "    # autoencoder = encoder + decoder\n",
    "    x_out = decoder(encoder(x_in))\n",
    "    autoencoder = Model(x_in, x_out)\n",
    "    autoencoder.compile(optimizer='adam', loss='mse')\n",
    "    \n",
    "    return autoencoder, encoder, decoder"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"model_3\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "input_2 (InputLayer)         [(None, 28, 28, 1)]       0         \n",
      "_________________________________________________________________\n",
      "model_1 (Model)              (None, 4, 4, 4)           1612      \n",
      "_________________________________________________________________\n",
      "model_2 (Model)              (None, 28, 28, 1)         1757      \n",
      "=================================================================\n",
      "Total params: 3,369\n",
      "Trainable params: 3,369\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n",
      "Train on 60000 samples, validate on 10000 samples\n",
      "Epoch 1/8\n",
      "60000/60000 [==============================] - 29s 477us/sample - loss: 0.0606 - val_loss: 0.0399\n",
      "Epoch 2/8\n",
      "60000/60000 [==============================] - 34s 572us/sample - loss: 0.0341 - val_loss: 0.0301\n",
      "Epoch 3/8\n",
      "60000/60000 [==============================] - 43s 715us/sample - loss: 0.0288 - val_loss: 0.0272\n",
      "Epoch 4/8\n",
      "60000/60000 [==============================] - 48s 806us/sample - loss: 0.0265 - val_loss: 0.0253\n",
      "Epoch 5/8\n",
      "60000/60000 [==============================] - 41s 680us/sample - loss: 0.0249 - val_loss: 0.0239\n",
      "Epoch 6/8\n",
      "60000/60000 [==============================] - 39s 649us/sample - loss: 0.0237 - val_loss: 0.0230\n",
      "Epoch 7/8\n",
      "60000/60000 [==============================] - 33s 545us/sample - loss: 0.0229 - val_loss: 0.0222\n",
      "Epoch 8/8\n",
      "60000/60000 [==============================] - 29s 484us/sample - loss: 0.0224 - val_loss: 0.0217\n"
     ]
    }
   ],
   "source": [
    "ae, enc, dec = ae_model()\n",
    "ae.summary()\n",
    "ae.fit(x_train, x_train, batch_size=128, epochs=8, validation_data=(x_test, x_test))\n",
    "ae.save('mnist_ae.h5')\n",
    "enc.save('mnist_enc.h5')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "ae = load_model('mnist_ae.h5')\n",
    "enc = load_model('mnist_enc.h5')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calculate Trust Scores"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Initialize trust scores:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "ts = TrustScore()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The key is to **fit and calculate the trust scores on the encoded instances**. The encoded data still needs to be reshaped from (60000, 4, 4, 4) to (60000, 64) to comply with the k-d tree format. This is handled internally:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Reshaping data from (60000, 4, 4, 4) to (60000, 64) so k-d trees can be built.\n"
     ]
    }
   ],
   "source": [
    "x_train_enc = enc.predict(x_train)\n",
    "ts.fit(x_train_enc, y_train, classes=10)  # 10 classes present in MNIST"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now calculate the trust scores and closest not predicted classes of the predictions on the test set, using the distance to the 5th nearest neighbor in each class:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Reshaping data from (1000, 4, 4, 4) to (1000, 64) so k-d trees can be queried.\n"
     ]
    }
   ],
   "source": [
    "n_samples = 1000 # calculate the trust scores for the first 1000 predictions on the test set\n",
    "x_test_enc = enc.predict(x_test[:n_samples])\n",
    "y_pred = sc.predict(x_test[:n_samples])\n",
    "score, closest_class = ts.score(x_test_enc[:n_samples], y_pred, k=5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's inspect which predictions have low and high trust scores:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "n = 5\n",
    "\n",
    "# lowest and highest trust scores\n",
    "idx_min, idx_max = np.argsort(score)[:n], np.argsort(score)[-n:]\n",
    "score_min, score_max = score[idx_min], score[idx_max]\n",
    "closest_min, closest_max = closest_class[idx_min], closest_class[idx_max]\n",
    "pred_min, pred_max = y_pred[idx_min], y_pred[idx_max]\n",
    "imgs_min, imgs_max = x_test[idx_min], x_test[idx_max]\n",
    "label_min, label_max = np.argmax(y_test[idx_min], axis=1), np.argmax(y_test[idx_max], axis=1)\n",
    "\n",
    "# model confidence percentiles\n",
    "max_proba = y_pred.max(axis=1)\n",
    "\n",
    "# low score high confidence examples\n",
    "idx_low = np.where((max_proba>0.80) & (max_proba<0.9) & (score<1))[0][:n]\n",
    "score_low = score[idx_low]\n",
    "closest_low = closest_class[idx_low]\n",
    "pred_low = y_pred[idx_low]\n",
    "imgs_low = x_test[idx_low]\n",
    "label_low = np.argmax(y_test[idx_low], axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Low Trust Scores"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The image below makes clear that the low trust scores correspond to misclassified images. Because the trust scores are significantly below 1, they correctly identified that the images belong to another class than the predicted class, and identified that class."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABHgAAAETCAYAAABN+bF9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3debgcVZn48e8bIpuIsijbAGETBIwgy7BKoiKjLA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4SsBFl988dJYs6FsJUkqc+CBB5bGNttss9LYM888UxpzOHSNROecc05pbPz48aWxDTbYoDQ2b9680tiMGTNKY5/5zGdKY7fddltp7IUXXiiNSWrNE088URr7+c9/Xhprlu+nnHJKw/nNXj9uvfXW0lgz6623XmnM14jB4RU8kiRJkiRJFWeBR5IkSZIkqeIs8EiSJEmSJFWcBR5JkiRJkqSKs8AjSZIkSZJUcZFS6qxhRGcNpZHjppTSxt3uRD1zUzI3q+Kaa64pjW2xxRalsZNOOqk01mxkLnWduTkEVlpppdLYqquuWhqbM2dOaazTEXJUWeam1INSStFuG6/gkSRJkiRJqjgLPJIkSZIkSRVngUeSJEmSJKniLPBIkiRJkiRVnAUeSZIkSZKkirPAI0mSJEmSVHFju90BSZI0Oj399NOlsa9+9aulsRNOOGEouiNV0sMPP9xRTJI08ngFjyRJkiRJUsVZ4JEkSZIkSao4CzySJEmSJEkVZ4FHkiRJkiSp4izwSJIkSZIkVZwFHkmSJEmSpIpzmHRJktQVO+64Y7e7IEmSNGJ4BY8kSZIkSVLFWeCRJEmSJEmqOAs8kiRJkiRJFWeBR5IkSZIkqeIs8EiSJEmSJFWcBR5JkiRJkqSKs8AjSZIkSZJUcRZ4JEmSJEmSKs4CjyRJkiRJUsVZ4JEkSZIkSao4CzySJEmSJEkVZ4FHkiRJkiSp4izwSJIkSZIkVdzYAbR9AnhgsDoiVdCq3e5ACXNTo525KfUmc1PqTeam1Hs6ystIKQ12RyRJkiRJkjSM/ImWJEmSJElSxVngkSRJkiRJqjgLPJIkSZIkSRVngUeSJEmSJKniLPBIkiRJkiRVnAUeSZIkSZKkirPAI0mSJEmSVHEWeCRJkiRJkirOAo8kSZIkSVLF/X8jbCG0nLBDgwAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 1440x288 with 5 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20, 4))\n",
    "for i in range(n):\n",
    "    ax = plt.subplot(1, n, i+1)\n",
    "    plt.imshow(imgs_min[i].reshape(28, 28))\n",
    "    plt.title('Model prediction: {} (p={:.2f}) \\n Label: {} \\n Trust score: {:.3f}' \\\n",
    "              '\\n Closest other class: {}'.format(pred_min[i].argmax(),pred_min[i].max(),\n",
    "                                                  label_min[i], score_min[i], closest_min[i]), fontsize=14)\n",
    "    ax.get_xaxis().set_visible(False)\n",
    "    ax.get_yaxis().set_visible(False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### High Trust Scores"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The high trust scores on the other hand all are very clear 1's:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABHgAAAETCAYAAABN+bF9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deZxcVZ338c8vhLCqCEECyCKIBBQIIhiUKD4MIgqI4AIIsrgy4jgqosijIiMuiAuKOCOiyODoM8iioo4Ksgg4gCyy77uyy5YQCEnO88c5DTeVut1d3V1ddTuf9+t1X0ndc++pU1X3W8uv7xIpJSRJkiRJktRck3o9AEmSJEmSJI2OBR5JkiRJkqSGs8AjSZIkSZLUcBZ4JEmSJEmSGs4CjyRJkiRJUsNZ4JEkSZIkSWq4vijwRMTUiEgRsW0H6xweEdd0cVgdi4hrIuLwyu07IuLgUfZ5bkQcO+rBjaOI2CAi7o+IF/R6LN0QEadExCd6PY7xYDYH7dNs9hmzOeQ6ZrNPmc2Jw2wO2qfZ7DNmc8h1zGafMpv1hizwRMSJJQwntGn7amk7cyR3vgTYEjhuOAtGxH4RMbtN027AoWM6qmGKiGM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SJEmSJKnhLPBIkiRJkiQ1nJdJHyff+973atv22Wef2rYbb7yxG8ORNEpvectb2s6fPLn+bXX+/PndGo6kLrnvvvt6PQRpQtt3331r2771rW/Vti211FLdGI40IQ32m3KllVZqO//666/v1nDURe7BI0mSJEmS1HAWeCRJkiRJkhrOAo8kSZIkSVLDWeCRJEmSJElqOAs8kiRJkiRJDRcppZGtGDGyFaWJ47KU0qt6PYhWZlMym1KfMptSfzKbUh9KKUWn67gHjyRJkiRJUsNZ4JEkSZIkSWo4CzySJEmSJEkNZ4FHkiRJkiSp4SzwSJIkSZIkNZwFHkmSJEmSpIazwCNJkiRJktRwFngkSZIkSZIazgKPJEmSJElSw1ngkSRJkiRJajgLPJIkSZIkSQ1ngUeSJEmSJKnhLPBIkiRJkiQ1nAUeSZIkSZKkhrPAI0mSJEmS1HAWeCRJkiRJkhrOAo8kSZIkSVLDWeCRJEmSJElqOAs8kiRJkiRJDWeBR5IkSZIkqeEs8EiSJEmSJDWcBR5JkiRJkqSGs8AjSZIkSZLUcBZ4JEmSJEmSGs4CjyRJkiRJUsNZ4JEkSZIkSWo4CzySJEmSJEkNN3kU6z4E3DlWA5EaaJ1eD6CG2dSSzmxK/clsSv3JbEr9Z0S5jJTSWA9EkiRJkiRJ48hDtCRJkiRJkhrOAo8kSZIkSVLDWeCRJEmSJElqOAs8kiRJkiRJDWeBR5IkSZIkqeEs8EiSJEmSJDWcBR5JkiRJkqSGs8AjSZIkSZLUcBZ4JEmSJEmSGu7/A+rz5kO5PZEKAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 1440x288 with 5 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20, 4))\n",
    "for i in range(n):\n",
    "    ax = plt.subplot(1, n, i+1)\n",
    "    plt.imshow(imgs_max[i].reshape(28, 28))\n",
    "    plt.title('Model prediction: {} (p={:.2f}) \\n Label: {} \\n Trust score: {:.3f}' \\\n",
    "              '\\n Closest other class: {}'.format(pred_max[i].argmax(),pred_max[i].max(),\n",
    "                                                  label_max[i], score_max[i], closest_max[i]), fontsize=14)\n",
    "    ax.get_xaxis().set_visible(False)\n",
    "    ax.get_yaxis().set_visible(False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### High model confidence, low trust score"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Where trust scores really matter is when the predicted model confidence is relatively high (e.g. $p\\in[0.8, 0.9]$) but the corresponding trust score is low, this can indicate samples for which the model is overconfident.The trust score provides a diagnostic for finding these examples:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABHgAAAETCAYAAABN+bF9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3dd7wU1fnH8e8DCEgRVLAX7GILih1UEgR7YosVFaPYYqLkp0YliSWixhY1JBoVgyWxYIsaBbsRa8RYETUKWMAEC01pwvn9cc7VYdkzd3fv3t2dvZ/36zUvuPNMObM7z87sszNzzDknAAAAAAAAZFerajcAAAAAAAAATUOBBwAAAAAAIOMo8AAAAAAAAGQcBR4AAAAAAICMo8ADAAAAAACQcRR4AAAAAAAAMq4mCjxm1s3MnJn1K2Kec83szWZsVtHM7E0zOzfx92QzO62Jy3zKzEY0uXEVZGbLm9l/zWy9arelOZjZT83sgWq3oxLIzdRlZjE3Nwi52aXabWkOZnapmf2h2u2oBHIzdZnkZo0xs9Fm9n/VbkclkJupyyQ3awy52eg85GaNagG5+ZKZHVDKvI0WeMxsVEiGkXlivwuxB0tZeQuwjaQ/FTKhmQ02szl5QvtLOqusrSq8PS4ybNPI7G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x8+cOTMau+uuu6Kx448/vuxtaQbjnXNbV7sRuWolN+tdu3bt8o6fP39+dJ42bdpEY3369InGDjzwwGisd+/e0djyyy8fjW244YbRWNqx9uSTT47GrrvuumiswsjNOvejH/0oGttuu+3yjt9xxx2j8+y8885NblO5pB2n77zzzmjspZdeisYuv/zyJrWpjMjNCrv22mujsSFDhkRjlT5fjGnVKn6dyOLFi6OxVVZZJRqbPn16k9pUp4rOTa7gAQAAAAAAyDgKPAAAAAAAABlHgQcAAAAAACDjKPAAAAAAAABkHAUeAAAAAACAjKPAAwAAAAAAkHF0k55hAwYMiMbGjBkTjU2cODEaGzhwYDT2ySefFNawFoRu0uPqoZv0SnZFWeluL0eMGBGNnXrqqWVfX4XR3StqWseOHaOxjz76KBrr0qVLNDZlypRobN111y2sYc2P3MRS2rZtG421a9cuGjvjjDOisV69ekVje+65Z2ENK5N58+ZFY7/85S/zjk87RjcTcrPCunbtGo1deOGF0diuu+4ajaXl0gsvvBCNde/ePe/4XXbZJTpP2nnrU089FY3tvvvu0djChQujsRaMbtIBAAAAAABaGgo8AAAAAAAAGUeBBwAAAAAAIOMo8AAAAAAAAGQcBR4AAAAAAICMo8ADAAAAAACQcXSTngFnnnlm3vE///nPo/O89tpr0diQIUOisY8//rjwhoFu0lNssskm0Vha16ZHHHFEczSnJK1axWvgixcvrol1zZgxIxq75ZZborE66Ao9Dd29IrO22mqraOzee++NxlZZZZVoLNbVbVq3uc2E3ERFLLvsstHY8ssvH42tscYa0didd94Zja255pqFNaxArVu3LuvyCkBuZkSnTp2isbRzyVmzZkVj/fr1yzv+sccei86T1k366NGjo7FDDjkkGkNedJMOAAAAAADQ0lDgAQAAAAAAyDgKPAAAAAAAABlHgQcAAAAAACDjKPAAAAAAAABkHAUeAAAAAACAjGtT7Qa0JCuttFI0dskll0Rjhx12WN7xY8eOjc6z7777RmOLFi2KxoBymTBhQjQ2ZMiQaOztt9+Oxg4//PBobPr06dFYWpft3bt3j8bSuid3rrw9d06aNCkau+uuu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1U1nWl5deFF14YjaXlSVp+AcXq2rVrNDZ69OhobOrUqdHYySefHI2NGTOmsIaVwY9//ONoLO24su+++0Zj66yzTjRmZtHYH//4x2jstNNOi8ZQ39K6BF911VVLWmba8WPkyJElLbMUace/xYsXV6wdkjRv3rxobPLkydFY2rn1BRdcEI1VoTt0YCnOFd8bfaVzE4XjCh4AAAAAAICMo8ADAAAAAACQcRR4AAAAAAAAMo4CDwAAAAAAQMZR4AEAAAAAAMg4CjwAAAAAAAAZRzfpJXjyySejsY022iga+/LLL6Oxzz//vEltKpdHH320out78MEHo7GZM2dGYxdffHHe8Z07d25ym4AGV1xxRTS21VZb5R3foUOHktaV1t1kWveVPXv2LGl9QLHSuvZeZpllorENNtggGrvqqqua1KZipLW/lC5iGzN79uxo7LbbbovGhg4dGo198803TWoTsuu+++6Lxl588cVoLO0Y0a1btya1qdq+/vrraCztnPuaa66Jxl599dVo7OGHHy6sYUAL9/LLL1e7CS0aV/AAAAAAAABkHAUeAAAAAACAjKPAAwAAAAAAkHEUeAAAAAAAADKOAg8AAAAAAEDGUeABAAAAAADIOGtK16BmVv5+RYEMcc7F+92tEvKyMo4//vi8488444zoPGuvvXY0ltaF86RJk6KxwYMHR2Pjxo2LxurceOfc1tVuRK56zs0DDzwwGttiiy2isd69e0dju+++WKtrfQAAAotJREFUe5PalOu5556LxtJyLM3YsWOjsUceeSQamz59eknrqwPkZoWtueaa0Vha1+vrrbdeSeu7//77o7G07txLMXHixGjs8ccfL+u6WgBys861a9cuGvvDH/6Qd/whhxwSnadjx47R2A9+8INo7Omnn47GkFfRuckVPAAAAAAAABlHgQcAAAAAACDjKPAAAAAAAABkHAUeAAAAAACAjKPAAwAAAAAAkHH0ogU0Ab1oIVfXrl2jsXvuuaek2C233BKNzZw5s7CGtSz0BgLUJnITqE3kJpbyq1/9Khrr379/NDZkyJBo7D//+U+T2tQC0YsWAAAAAABAS0OBBwAAAAAAIOMo8AAAAAAAAGQcBR4AAAAAAICMo8ADAAAAAACQcRR4AAAAAAAAMo5u0oEmoJt0oCbR3StQm8hNoDaRm0Btopt0AAAAAACAloYCDwAAAAAAQMZR4AEAAAAAAMg4CjwAAAAAAAAZR4EHAAAAAAAg4yjwAAAAAAAAZBwFHgAAAAAAgIyjwAMAAAAAAJBxFHgAAAAAAAAyjgIPAAAAAABAxlHgAQAAAAAAyDgKPAAAAAAAABlHgQcAAAAAACDjKPAAAAAAAABkHAUeAAAAAACAjKPAAwAAAAAAkHEUeAAAAAAAADKOAg8AAAAAAEDGUeABAAAAAADIOAo8AAAAAAAAGdemifN/JmlKORoCZNDa1W5ABHmJlo7cBGoTuQnUJnITqE1F56Y555qjIQAAAAAAAKgQbtECAAAAAADIOAo8AAAAAAAAGUeBBwAAAAAAIOMo8AAAAAAAAGQcBR4AAAAAAICMo8ADAAAAAACQcRR4AAAAAAAAMo4CDwAAAAAAQMZR4AEAAAAAAMi4/wcyA/PTbDniXQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 1440x288 with 5 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(20, 4))\n",
    "for i in range(min(n, len(idx_low))): # in case fewer than n instances are found\n",
    "    ax = plt.subplot(1, n, i+1)\n",
    "    plt.imshow(imgs_low[i].reshape(28, 28))\n",
    "    plt.title('Model prediction: {} (p={:.2f}) \\n Label: {} \\n Trust score: {:.3f}' \\\n",
    "              '\\n Closest other class: {}'.format(pred_low[i].argmax(),pred_low[i].max(),\n",
    "                                                  label_low[i], score_low[i], closest_low[i]), fontsize=14)\n",
    "    ax.get_xaxis().set_visible(False)\n",
    "    ax.get_yaxis().set_visible(False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see several examples of an over-confident model predicting the wrong class, the low trust score, however, reveals that this is happening and the predictions should not be trusted despite the high model confidence."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the following section we will see that on average trust scores outperform the model confidence for identifying correctly classified samples."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Comparison of Trust Scores with model prediction probabilities"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let’s compare the prediction probabilities from the classifier with the trust scores for each prediction by checking whether trust scores are better than the model’s prediction probabilities at identifying correctly classified examples.\n",
    "\n",
    "First we need to set up a couple of helper functions.\n",
    "\n",
    "* Define a function that handles model training and predictions:\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_sc(X_train, y_train, X_test):\n",
    "    clf = sc_model()\n",
    "    clf.fit(X_train, y_train, batch_size=128, epochs=5, verbose=0)\n",
    "    y_pred_proba = clf.predict(X_test)\n",
    "    y_pred = np.argmax(y_pred_proba, axis=1)\n",
    "    probas = y_pred_proba[range(len(y_pred)), y_pred]  # probabilities of predicted class\n",
    "    return y_pred, probas"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* Define the function that generates the precision plots:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "def plot_precision_curve(plot_title, \n",
    "                         percentiles, \n",
    "                         labels, \n",
    "                         final_tp, \n",
    "                         final_stderr, \n",
    "                         final_misclassification,\n",
    "                         colors = ['blue', 'darkorange', 'brown', 'red', 'purple']):\n",
    "    \n",
    "    plt.title(plot_title, fontsize=18)\n",
    "    colors = colors + list(cm.rainbow(np.linspace(0, 1, len(final_tp))))\n",
    "    plt.xlabel(\"Percentile\", fontsize=14)\n",
    "    plt.ylabel(\"Precision\", fontsize=14)\n",
    "    \n",
    "    for i, label in enumerate(labels):\n",
    "        ls = \"--\" if (\"Model\" in label) else \"-\"\n",
    "        plt.plot(percentiles, final_tp[i], ls, c=colors[i], label=label)\n",
    "        plt.fill_between(percentiles, \n",
    "                         final_tp[i] - final_stderr[i],\n",
    "                         final_tp[i] + final_stderr[i],\n",
    "                         color=colors[i],\n",
    "                         alpha=.1)\n",
    "    \n",
    "    if 0. in percentiles:\n",
    "        plt.legend(loc=\"lower right\", fontsize=14)\n",
    "    else:\n",
    "        plt.legend(loc=\"upper left\", fontsize=14)\n",
    "    model_acc = 100 * (1 - final_misclassification)\n",
    "    plt.axvline(x=model_acc, linestyle=\"dotted\", color=\"black\")\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* The function below trains the model on a number of folds, makes predictions, calculates the trust scores, and generates the precision curves to compare the trust scores with the model prediction probabilities:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "def run_precision_plt(X, y, nfolds, percentiles, run_model, test_size=.2, \n",
    "                      plt_title=\"\", plt_names=[], predict_correct=True, classes=10):\n",
    "    \n",
    "    def stderr(L):\n",
    "        return np.std(L) / np.sqrt(len(L))\n",
    "    \n",
    "    all_tp = [[[] for p in percentiles] for _ in plt_names]\n",
    "    misclassifications = []\n",
    "    mult = 1 if predict_correct else -1\n",
    "    \n",
    "    folds = StratifiedShuffleSplit(n_splits=nfolds, test_size=test_size, random_state=0)\n",
    "    for train_idx, test_idx in folds.split(X, y):\n",
    "        # create train and test folds, train model and make predictions\n",
    "        X_train, y_train = X[train_idx, :], y[train_idx, :]\n",
    "        X_test, y_test = X[test_idx, :], y[test_idx, :]\n",
    "        y_pred, probas = run_model(X_train, y_train, X_test)\n",
    "        # target points are the correctly classified points\n",
    "        y_test_class = np.argmax(y_test, axis=1)\n",
    "        target_points = (np.where(y_pred == y_test_class)[0] if predict_correct else \n",
    "                         np.where(y_pred != y_test_class)[0])\n",
    "        final_curves = [probas]\n",
    "        # calculate trust scores\n",
    "        ts = TrustScore()\n",
    "        ts.fit(enc.predict(X_train), y_train, classes=classes)\n",
    "        scores, _ = ts.score(enc.predict(X_test), y_pred, k=5)\n",
    "        final_curves.append(scores)  # contains prediction probabilities and trust scores\n",
    "        # check where prediction probabilities and trust scores are above a certain percentage level\n",
    "        for p, perc in enumerate(percentiles):\n",
    "            high_proba = [np.where(mult * curve >= np.percentile(mult * curve, perc))[0] for curve in final_curves]\n",
    "            if 0 in map(len, high_proba):\n",
    "                continue\n",
    "            # calculate fraction of values above percentage level that are correctly (or incorrectly) classified\n",
    "            tp = [len(np.intersect1d(hp, target_points)) / (1. * len(hp)) for hp in high_proba]\n",
    "            for i in range(len(plt_names)):\n",
    "                all_tp[i][p].append(tp[i])  # for each percentile, store fraction of values above cutoff value\n",
    "        misclassifications.append(len(target_points) / (1. * len(X_test)))\n",
    "    \n",
    "    # average over folds for each percentile\n",
    "    final_tp = [[] for _ in plt_names]\n",
    "    final_stderr = [[] for _ in plt_names]\n",
    "    for p, perc in enumerate(percentiles):\n",
    "        for i in range(len(plt_names)):\n",
    "            final_tp[i].append(np.mean(all_tp[i][p]))\n",
    "            final_stderr[i].append(stderr(all_tp[i][p]))\n",
    "\n",
    "    for i in range(len(all_tp)):\n",
    "        final_tp[i] = np.array(final_tp[i])\n",
    "        final_stderr[i] = np.array(final_stderr[i])\n",
    "\n",
    "    final_misclassification = np.mean(misclassifications)\n",
    "    \n",
    "    # create plot\n",
    "    plot_precision_curve(plt_title, percentiles, plt_names, final_tp, final_stderr, final_misclassification)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Detect correctly classified examples"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The x-axis on the plot below shows the percentiles for the model prediction probabilities of the predicted class for each instance and for the trust scores. The y-axis represents the precision for each percentile. For each percentile level, we take the test examples whose trust score is above that percentile level and plot the percentage of those points that were correctly classified by the classifier. We do the same with the classifier’s own model confidence (i.e. softmax probabilities). For example, at percentile level 80, we take the top 20% scoring test examples based on the trust score and plot the percentage of those points that were correctly classified. We also plot the top 20% scoring test examples based on model probabilities and plot the percentage of those that were correctly classified. The vertical dotted line is the error of the classifier. The plots are an average over 2 folds of the dataset with 20% of the data kept for the test set.\n",
    "\n",
    "The *Trust Score* and *Model Confidence* curves then show that the model precision is typically higher when using the trust scores to rank the predictions compared to the model prediction probabilities."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = x_train\n",
    "y = y_train\n",
    "percentiles = [0 + 0.5 * i for i in range(200)]\n",
    "nfolds = 2\n",
    "plt_names = ['Model Confidence', 'Trust Score']\n",
    "plt_title = 'MNIST -- Softmax Classifier -- Predict Correct'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Reshaping data from (48000, 4, 4, 4) to (48000, 64) so k-d trees can be built.\n",
      "Reshaping data from (12000, 4, 4, 4) to (12000, 64) so k-d trees can be queried.\n",
      "Reshaping data from (48000, 4, 4, 4) to (48000, 64) so k-d trees can be built.\n",
      "Reshaping data from (12000, 4, 4, 4) to (12000, 64) so k-d trees can be queried.\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAa8AAAEeCAYAAAA9/ZrRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOydd3hUZdbAfyedQKgJvUQUCwo2sK+gIhbWAu6uFcWGjXXdVdfu2kFhd2U/0bUsKDZ0EQuKBV2xIEoRUEQRRJSEUEJPgbT3++PcIcNkkswkk5lMOL/nmWfuvPe99565M/eee8p7XnHOYRiGYRjxREKsBTAMwzCMcDHlZRiGYcQdprwMwzCMuMOUl2EYhhF3mPIyDMMw4g5TXoZhGEbcYcprD0VEficii0WkWESciAyMtUyNARFZJSKzYi0HVC+LiFwrIj+IyE7vt8sWkXt8y1EXtAkiIiMCr4tgbUbsaBDl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HJ+9///peSkpJqJ2Rt3bo1AAsWLOD3v/89w4YN49tvv2XMmDGMHj2axx57bLf+//znP+nTpw9ff/01t9xyC3/961+ZM2cOoMp40KBB/OEPfyAvL4/x48dXOV5FRQVDhw6loqKCOXPmMHHiRO655x527ty5q09RUREnnHACaWlpfPLJJ8yZM4dOnToxaNAgioqKdvVbtWoVr7zyCq+//joffPABCxcu5I477ti1/sknn+Sqq67i0ksv5ZtvvmHGjBm74oPOOYYMGUJubi5vv/02Cxcu5Pjjj+fEE0/c5e5ssjjnmuTr8MMPdxFn0oHOvXSsc1tXu4oK51ascG7VKud+/dW5n35yrqIi8of0Z+HChW7hwoUNexAjJJYuXRq0fcCAqq8JE3RdYWHw9ZMm6foNG4KvnzJF1//6a9V14XLJJZe4IUOGuE2bNrm0tDT3448/ury8PJeSkuJ++eWXXet9dO7c2d17773/3969x+lY5g8c/3zHzJgDMwiDIccMsg7D6qQSemVThlQsRYvarE1tDsm21KbdvNYsKa9KCT/bDwmFH1psaxBCLDGOI6shtExY49R8f3/c90zPM8YYzDPPYb7v1+t5mfvw3Nf3nvvxfOe67uu+rnzneLf27t1bVVXfffddjY+P11OnTuVtnzFjhgL6+eefq6rqH/7wB23fvr3XMY4fP66Arl+/XlVVR48erTfffPNl4x44cKDGxcVd8fx69eql99xzj9e60aNHa2JiYt5y7dq1tWfPnl77NGjQQF999dW85c6dO2vfvn299qldu7b+5S9/UVXVzz77TMPCwvTAgQN521etWqWATnUv6JQpU7RBgwaa4/HFcPHiRa1UqZLOnj07L7ayZctqVlZW3j5jxozR+vXr5y0nJibqCy+8UOD5rlixQmNjY/XMmTNe65s3b65jx44t8D2ql//8qqoCGzUAvsOv9LKu8kV1/jQcT4dmv4bIWPbtc3oXpqZCcjJUr37JzCjF7rnnngPsOa9AVtiliYkpfHvlyoVvr1Wr8O1Xo2LFinTr1o0PPviAChUq0K5du0vud508eZJDhw5xxx13eK1v27Ytixc7j2ump6fTrFkzypX7abSZ2267zWv/TZs2kZaW5r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wJOtZsaIwxJuhY8jLGGBN0LHkZY4wJOpa8jDHGBB1LXsYYY4KOJS9jgpiI1BERFZHWBS0bE6oseZlSRUSmuV/uKiIXRCRDRMa54/0FNBH5p4i8lW/1QaA6sMUPIRnjN+FX3sWYkLMceByIAO7EeYA3Fhh4tQcSkUh3BgK/UNUfcQZgNaZUsZqXKY3Oqep3qnpQVf8X+BB36ggRaSIi/ycip9yJ/maKSLXcN7o1t0Ui8oKIfIszdiAiEikifxKRAyJyzq3RDfZ4X1GP+6yIZIrICRGZKiIxuduBu3HmXsutOdYpSjPhlco2JhhZ8jIGsoEIdyDTNOBrnLndOgLlgE9FxPP/yt1AM5yhdjq466YDfYDngcY4Ex1mQd4AqUU57p1AU3d7D6AbzuSZuP+uBabiNBNWx3uKiwJdRdnGBBVrNjSlmoi0AXrhzDo7EPiXqr7gsb0PzoR/rYEv3dVngX654+KJyE04g/3+QlWXuvtkeBRT1OOeBJ52mwLTRWQOTnL8s6r+ICLngTPuYLu5x7nSKRa1bGOCiv3lZUqjTiJyWkTO4tRm0oBngFbAXe620yJymp9qN/U93v91vgFdW+IMcPz5Zcor6nF3uIkr1yGg6rWc4DWUbUxQsZqXKY3SgKeAC8Ahd84n3Ga0/wOGFvCeIx4///cqyyvqcS/k26Zc/x+YRS3bmKBiycuURmdUdW8B678CHgUO5Ca0ItqCkyTuAZYWsP1aj5vfeZypeq5GcZVtTECxZkNjfjIJiAdmi8gtIlJPRDqKyGQRKX+5N6nqbpw5lN4Xke7uZKZ3isjj13PcAnwDtHF7GFYuYoeL4irbmIBiycsYl6oewpkuPgenBrUd58v/nPsqTB/gf4GJwE5gGk7SuN7jehqHU/vaARzDmXDQl+dkTMCyySiNMcYEHat5GWOMCTqWvIwxxgQdS17GGGOCjiUvY4wxQceSlzHGmKBjycsYY0zQseRljDEm6FjyMsYYE3T+HyIOHoJhM4eQAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "run_precision_plt(X, y, nfolds, percentiles, run_sc, plt_title=plt_title, \n",
    "                  plt_names=plt_names, predict_correct=True)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
